<template>
	<view>
		<view class="margin_top ffffff">
			<view class="flexleft padding_top">
				<view class="line margin_right2"></view>
				<view class="sanshier xiaohei fonweight">基本信息</view>
			</view>
			<view class="mainpadding">
				<view class="flexbetween xiaohei titletext">
					<view>缘主信息</view>
					<view>{{dataAll.base_info.name}}</view>
				</view>
				<view class="flexbetween xiaohei margin_top titletext">
					<view>出生公历</view>
					<view>{{dataAll.base_info.gongli}}</view>
				</view>
				<view class="flexbetween xiaohei margin_top titletext">
					<view>出生农历</view>
					<view>{{dataAll.base_info.nongli}}</view>
				</view>
				<!-- <view class="flexbetween xiaohei margin_top titletext">
					<view>八字生辰</view>
					<view>乙酉 戊子 辛巳 壬辰</view>
				</view>
				<view class="flexbetween xiaohei margin_top titletext">
					<view>年柱纳音</view>
					<view>泉中水命</view>
				</view> -->
				<view class="flexbetween xiaohei margin_top titletext">
					<view>生肖星座</view>
					<view>{{dataAll.start_info.sx}}-{{dataAll.start_info.xz}}</view>
				</view>
				<view class="flexbetween xiaohei margin_top titletext">
					<view>起运周岁</view>
					<view>{{dataAll.base_info.qiyun}}</view>
				</view>
				<view class="flexbetween xiaohei margin_top titletext">
					<view>交运日期</view>
					<view>{{dataAll.base_info.jiaoyun}}</view>
				</view>
				
			</view>
		</view>
		<view class="margin_top ffffff">
			<view class="flexleft padding_top">
				<view class="line margin_right2"></view>
				<view class="sanshier xiaohei fonweight">八字排盘</view>
			</view>
			<view class="" style="padding: 30rpx 0;">
				<uni-table border emptyText="暂无更多数据" >
					<!-- 表头行 -->
					<uni-tr>
						<uni-th align="center" width="125rpx">主星</uni-th>
						<uni-th align="center" width="125rpx" v-for="item in dataAll.bazi_info.tg_cg_god">{{item}}</uni-th>
						<uni-th align="center" width="125rpx">#</uni-th>
					</uni-tr>
					<!-- 表格数据行 -->
					<uni-tr>
						<uni-td align="center" width="125rpx">乾造</uni-td>
						<uni-td align="center" width="125rpx" v-for="item in dataAll.bazi_info.bazi">{{item}}</uni-td>
						<uni-td align="center" width="125rpx">({{dataAll.bazi_info.kw}}空)</uni-td>
					</uni-tr>
					<uni-tr>
						<uni-td align="center" width="125rpx">藏干</uni-td>
						<uni-td align="center" width="125rpx" v-for="item in dataAll.bazi_info.dz_cg">{{item}}</uni-td>
						<uni-td align="center" width="125rpx">#</uni-td>
					</uni-tr>
					<uni-tr>
						<uni-td align="center" width="125rpx">副星</uni-td>
						<uni-td align="center" width="125rpx" v-for="item in dataAll.bazi_info.dz_cg_god">{{item}}</uni-td>
						<uni-td align="center" width="125rpx">#</uni-td>
					</uni-tr>
					<uni-tr>
						<uni-td align="center" width="125rpx">星运</uni-td>
						<uni-td align="center" width="125rpx" v-for="item in dataAll.bazi_info.day_cs">{{item}}</uni-td>
						<uni-td align="center" width="125rpx">#</uni-td>
					</uni-tr>
					<uni-tr>
						<uni-td align="center" width="125rpx">自坐</uni-td>
						<uni-td align="center" width="125rpx" v-for="(value,key,index) in dataAll.detail_info.zizuo" :key="key">{{value}}</uni-td>
						<uni-td align="center" width="125rpx">#</uni-td>
					</uni-tr>
					<uni-tr>
						<uni-td align="center" width="125rpx">空亡</uni-td>
						<uni-td align="center" width="125rpx" v-for="(value,key,index) in dataAll.detail_info.kongwang" :key="key">{{value}}</uni-td>
						<uni-td align="center" width="125rpx">#</uni-td>
					</uni-tr>
					<uni-tr>
						<uni-td align="center" width="125rpx">纳音</uni-td>
						<uni-td align="center" width="125rpx" v-for="item in dataAll.bazi_info.na_yin">{{item}}</uni-td>
						<uni-td align="center" width="125rpx">#</uni-td>
					</uni-tr>
				</uni-table>
			</view>
		</view>
		<view class="margin_top ffffff">
			<view class="flexleft padding_top">
				<view class="line margin_right2"></view>
				<view class="sanshier xiaohei fonweight">四柱神煞</view>
			</view>
			<view class="mainpadding">
				<view class="flexbetween xiaohei titletext">
					<view>年柱</view>
					<view>{{dataAll.start_info.jishen[0]}}</view>
				</view>
				<view class="flexbetween xiaohei margin_top titletext">
					<view>月柱</view>
					<view>{{dataAll.start_info.jishen[1]}}</view>
				</view>
				<view class="flexbetween xiaohei margin_top titletext">
					<view>日柱</view>
					<view>{{dataAll.start_info.jishen[2]}}</view>
				</view>
				<view class="flexbetween xiaohei margin_top titletext">
					<view>时柱</view>
					<view>{{dataAll.start_info.jishen[3]}}</view>
				</view>
			</view>
		</view>
		<view class="margin_top ffffff">
			<view class="flexleft padding_top">
				<view class="line margin_right2"></view>
				<view class="sanshier xiaohei fonweight">大运排盘</view>
			</view>
			<view class="" style="padding: 30rpx 0;">
				<scroll-view scroll-x="true" >
					<uni-table border emptyText="暂无更多数据" >
						<!-- 表头行 -->
						<uni-tr>
							<uni-th align="center" width="125rpx">#</uni-th>
							<uni-th align="center" width="125rpx" v-for="item in dataAll.dayun_info.big_god">{{item}}</uni-th>
						</uni-tr>
						<!-- 表格数据行 -->
						<uni-tr>
							<uni-td align="center" width="125rpx">大运</uni-td>
							<uni-td align="center" width="125rpx" v-for="item in dataAll.dayun_info.big">{{item}}</uni-td>
						</uni-tr>
						<uni-tr>
							<uni-td align="center" width="125rpx"></uni-td>
							<uni-td align="center" width="125rpx" v-for="item in dataAll.dayun_info.big_cs">{{item}}</uni-td>
						</uni-tr>
						<uni-tr>
							<uni-td align="center" width="125rpx">虚岁</uni-td>
							<uni-td align="center" width="125rpx" v-for="item in dataAll.dayun_info.xu_sui">{{item}}</uni-td>
						</uni-tr>
						<uni-tr>
							<uni-td align="center" width="125rpx">始于</uni-td>
							<uni-td align="center" width="125rpx" v-for="item in dataAll.dayun_info.big_start_year">{{item}}</uni-td>
						</uni-tr>
						<uni-tr>
							<uni-td align="center" width="125rpx"></uni-td>
							<uni-td align="center" width="125rpx" v-for="value in dataAll.dayun_info.years_info0" :key="key">{{value.year_char}}</uni-td>
						</uni-tr>
						<uni-tr>
							<uni-td align="center" width="125rpx"></uni-td>
							<uni-td align="center" width="125rpx" v-for="value in dataAll.dayun_info.years_info1" :key="key">{{value.year_char}}</uni-td>
						</uni-tr>
						<uni-tr>
							<uni-td align="center" width="125rpx"></uni-td>
							<uni-td align="center" width="125rpx" v-for="value in dataAll.dayun_info.years_info2" :key="key">{{value.year_char}}</uni-td>
						</uni-tr>
						<uni-tr>
							<uni-td align="center" width="125rpx"></uni-td>
							<uni-td align="center" width="125rpx" v-for="value in dataAll.dayun_info.years_info3" :key="key">{{value.year_char}}</uni-td>
						</uni-tr>
						<uni-tr>
							<uni-td align="center" width="125rpx"></uni-td>
							<uni-td align="center" width="125rpx" v-for="value in dataAll.dayun_info.years_info4" :key="key">{{value.year_char}}</uni-td>
						</uni-tr>
						<uni-tr>
							<uni-td align="center" width="125rpx"></uni-td>
							<uni-td align="center" width="125rpx" v-for="value in dataAll.dayun_info.years_info5" :key="key">{{value.year_char}}</uni-td>
						</uni-tr>
						<uni-tr>
							<uni-td align="center" width="125rpx"></uni-td>
							<uni-td align="center" width="125rpx" v-for="value in dataAll.dayun_info.years_info6" :key="key">{{value.year_char}}</uni-td>
						</uni-tr>
						<uni-tr>
							<uni-td align="center" width="125rpx"></uni-td>
							<uni-td align="center" width="125rpx" v-for="value in dataAll.dayun_info.years_info7" :key="key">{{value.year_char}}</uni-td>
						</uni-tr>
						<uni-tr>
							<uni-td align="center" width="125rpx"></uni-td>
							<uni-td align="center" width="125rpx" v-for="value in dataAll.dayun_info.years_info8" :key="key">{{value.year_char}}</uni-td>
						</uni-tr>
						<uni-tr>
							<uni-td align="center" width="125rpx"></uni-td>
							<uni-td align="center" width="125rpx" v-for="value in dataAll.dayun_info.years_info9" :key="key">{{value.year_char}}</uni-td>
						</uni-tr>
						<uni-tr>
							<uni-td align="center" width="125rpx">止于</uni-td>
							<uni-td align="center" width="125rpx" v-for="item in dataAll.dayun_info.big_end_year">{{item}}</uni-td>
						</uni-tr>
					</uni-table>
				</scroll-view>
				
			</view>
		</view>
		<view class="margin_top ffffff">
			<view class="flexleft padding_top">
				<view class="line margin_right2"></view>
				<view class="sanshier xiaohei fonweight">大运神煞</view>
			</view>
			<view class="mainpadding">
				<view class="flexbetween margin_top xiaohei titletext" v-for="(item,index) in dataAll.detail_info.dayunshensha" :key="index">
					<view>{{item.tgdz}}</view>
					<view>{{item.shensha}}</view>
				</view>
				
			</view>
		</view>
		<view class="mainpadding margin_top6">
			<view class="bigbtn" @click="backpage">返回重测</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				dataAll: {}
			}
		},
		onLoad(options) {
			let data = JSON.parse(decodeURIComponent(options.msg));
			console.log(data);
			this.getDetail(data)
		},
		methods: {
			getDetail(data) {
				httpRequest.request(data.url, 'POST', data.data).then(res => {
					if(res.code==1){
						this.dataAll = res.data
					}else{
						httpRequest.toast(res.msg)
						setTimeout(()=>{
							uni.navigateBack(1)
						},1000)
					}
				}).catch(err => {})
			},
		}
	}
</script>

<style lang="scss" scoped>
/deep/.uni-table-td{
	padding: 16rpx 0 !important;
}
/deep/.uni-table-th{
	background-color: #fff3f3 !important;
	color: #F3271C;
}
</style>